package yunwo.cn.yzstation.presenter;

import yunwo.cn.yzstation.api.TrainnumberView;
import yunwo.cn.yzstation.base.BasePresenter;
import yunwo.cn.yzstation.bean.CinfoBean;
import yunwo.cn.yzstation.model.TrainnumberM;
import yunwo.cn.yzstation.model.TrainnumberModel;
import yunwo.cn.yzstation.view.activity.TrainnumberActivity;

/**
 * Created by lao on 2017/10/16.
 */

public class TrainnumberPersenter extends BasePresenter<TrainnumberView> implements TrainnumberModel {
    TrainnumberActivity trainnumberActivity;
    TrainnumberView trainnumberView;
    private final TrainnumberM mTrainnumberM;

    public TrainnumberPersenter(TrainnumberActivity trainnumberActivity, TrainnumberView trainnumberView) {
        this.trainnumberActivity = trainnumberActivity;
        this.trainnumberView = trainnumberView;
        mTrainnumberM = new TrainnumberM(trainnumberActivity, this);
    }

    public void getCarData(String type, int page) {
        mTrainnumberM.getCarData(type,page);
    }

    @Override
    public void getDataSueecss(String type, CinfoBean.DataBean dataBean) {
        trainnumberView.getDataSueecss(type, dataBean);
    }

    @Override
    public void getDataFailure() {
        trainnumberView.getDataFailure();
    }
}
